Skip to content

[670] Added hover style for table widget - #161

Merged
killev merged 5 commits into
mainfrom
670-add-hover-effect-for-table-widget
Jun 7, 2025
Merged

[670] Added hover style for table widget#161
killev merged 5 commits into
mainfrom
670-add-hover-effect-for-table-widget

Conversation

@Anton-88

@Anton-88 Anton-88 commented Jun 7, 2025

Copy link
Copy Markdown
Contributor

Added hover style for table widget

@Anton-88
Anton-88 requested a review from killev as a code owner June 7, 2025 13:30
@coderabbitai

coderabbitai Bot commented Jun 7, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This change updates the table widget's UI by introducing a new .background-circle decorative element inside each table row and enhancing the .sf-table-row styles. The SCSS now supports interactive visual feedback on hover and focus, including scaling, color transitions, and responsive adjustments for improved user interaction.

Changes

File(s) Change Summary
website/modules/asset/ui/src/scss/_table-widget.scss Enhanced .sf-table-row with interactive hover/focus styles, transitions, and a new .background-circle element.
website/modules/table-widget/views/widget.html Added a <div class="background-circle" aria-hidden="true"> element inside each .sf-table-row.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TableRow (HTML)
    participant SCSS

    User->>TableRow (HTML): Hover or focus on .sf-table-row
    TableRow (HTML)->>SCSS: Triggers hover/focus state
    SCSS-->>TableRow (HTML): Applies scale, z-index, color transitions
    SCSS-->>TableRow (HTML): Reveals and animates .background-circle
    User-->>TableRow (HTML): Moves mouse away or blurs
    TableRow (HTML)->>SCSS: Removes hover/focus state
    SCSS-->>TableRow (HTML): Reverts styles and hides .background-circle
Loading

Possibly related PRs

  • [518] Added Table widget #98: Adds the initial table widget module, including schema, registration, and base styles, which the current PR directly builds upon by enhancing the widget's UI.

Suggested reviewers

  • yuramax
  • VitalyyP

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dce598b and a844929.

📒 Files selected for processing (1)
  • website/modules/asset/ui/src/scss/_table-widget.scss (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • website/modules/asset/ui/src/scss/_table-widget.scss
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: e2e-tests
  • GitHub Check: unit-tests
  • GitHub Check: lint
  • GitHub Check: security-scan
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (actions)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (4)
website/modules/asset/ui/src/scss/_table-widget.scss (4)

38-42: Improve animation performance by specifying will-change and targeted transitions
Transitioning all is expensive; consider limiting transitions to transform, border-color, and color properties. Additionally, hint the browser for animations by adding will-change: transform.

 .sf-table-row {
-  @include transition(all, 0.5s);
+  @include transition(transform 0.5s, border-color 0.5s, color 0.5s);

+  /* Hint browser to optimize for transform changes */
+  will-change: transform;
   transform: scale3d(1, 1, 1);
 }

48-52: Prevent decorative circle from intercepting pointer events
Add pointer-events: none to the .background-circle to ensure it doesn’t block row interactions.

 .background-circle {
-  display: none;
+  display: none;
+  pointer-events: none;

   @include decorative-background-circle($gray-500, 25%, 130%, 100%, -100% -60% auto auto, -10);
 }

53-76: DRY repeated hover styles into a mixin
The hover effects under default and medium breakpoints are nearly identical. Extract shared rules (transform, z-index, border-color, text color, background-circle sizing) into a reusable mixin for maintainability.

// Define once
@mixin table-row-hover-effect {
  transform: scale3d(1.03, 1.03, 1);
  z-index: 10;
  border-color: black;
  .sf-table-title, .sf-table-cell-title { color: $gray-100; }
  .sf-table-cell-description, .sf-table-link a { color: $gray-200; }
  .background-circle {
    display: block;
    width: 150em;
    height: 50em;
    transform: translate3d(-5%, -10%, 0);
  }
}

// Then include:
.sf-table-row {
  &:hover { @include table-row-hover-effect; }

  @include breakpoint-medium {
    &:hover { @include table-row-hover-effect; }
  }
}

Also applies to: 91-111


87-89: Consolidate decorative mixin usage
You reapply decorative-background-circle under the medium breakpoint. Consider defining it once at the root .sf-table-row .background-circle and overriding only on hover, to avoid duplication.

 .sf-table-row {
   .background-circle {
-    @include decorative-background-circle($gray-500, 25%, 130%, 100%, -100% -60% auto auto, -10);
   }

   @include breakpoint-medium {
     .background-circle {
-      @include decorative-background-circle($gray-500, 25%, 130%, 100%, -100% -60% auto auto, -10);
     }
   }
 }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8dced6e and 040f3d1.

📒 Files selected for processing (2)
  • website/modules/asset/ui/src/scss/_table-widget.scss (6 hunks)
  • website/modules/table-widget/views/widget.html (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: e2e-tests
  • GitHub Check: unit-tests
  • GitHub Check: lint
  • GitHub Check: security-scan
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (actions)

Comment thread website/modules/asset/ui/src/scss/_table-widget.scss
Comment thread website/modules/table-widget/views/widget.html Outdated
@github-actions

github-actions Bot commented Jun 7, 2025

Copy link
Copy Markdown

🔍 Vulnerabilities of apostrophe-cms:test

📦 Image Reference apostrophe-cms:test
digestsha256:9feeac3d42e805c782e19c9119b89eb56d8c71ba9c3f98833f5351fb47243bc9
vulnerabilitiescritical: 0 high: 3 medium: 0 low: 0
platformlinux/amd64
size289 MB
packages971
📦 Base Image node:23-alpine
also known as
  • 23-alpine3.22
  • 23.11-alpine
  • 23.11-alpine3.22
  • 23.11.1-alpine
  • 23.11.1-alpine3.22
digestsha256:b9d38d589853406ff0d4364f21969840c3e0397087643aef8eede40edbb6c7cd
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 0
critical: 0 high: 1 medium: 0 low: 0 connect-multiparty 2.2.0 (npm)

pkg:npm/connect-multiparty@2.2.0

high 7.8: CVE--2022--29623 Unrestricted Upload of File with Dangerous Type

Affected range<=2.2.0
Fixed versionNot Fixed
CVSS Score7.8
CVSS VectorCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Score0.334%
EPSS Percentile56th percentile
Description

An arbitrary file upload vulnerability in the file upload module of Express Connect-Multiparty 2.2.0 allows attackers to execute arbitrary code via a crafted PDF file. NOTE: the Supplier has not verified this vulnerability report.

critical: 0 high: 1 medium: 0 low: 0 async 0.9.2 (npm)

pkg:npm/async@0.9.2

high 7.8: CVE--2021--43138 OWASP Top Ten 2017 Category A9 - Using Components with Known Vulnerabilities

Affected range<2.6.4
Fixed version2.6.4, 3.2.2
CVSS Score7.8
CVSS VectorCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Score1.061%
EPSS Percentile77th percentile
Description

A vulnerability exists in Async through 3.2.1 (fixed in 3.2.2), which could let a malicious user obtain privileges via the mapValues() method.

critical: 0 high: 1 medium: 0 low: 0 async 1.5.2 (npm)

pkg:npm/async@1.5.2

high 7.8: CVE--2021--43138 OWASP Top Ten 2017 Category A9 - Using Components with Known Vulnerabilities

Affected range<2.6.4
Fixed version2.6.4, 3.2.2
CVSS Score7.8
CVSS VectorCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Score1.061%
EPSS Percentile77th percentile
Description

A vulnerability exists in Async through 3.2.1 (fixed in 3.2.2), which could let a malicious user obtain privileges via the mapValues() method.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 7, 2025
@Anton-88 Anton-88 self-assigned this Jun 7, 2025
@Anton-88 Anton-88 changed the title Added hover style for table widget [670] Added hover style for table widget Jun 7, 2025

@VitalyyP VitalyyP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@killev
killev enabled auto-merge (squash) June 7, 2025 18:40
@sonarqubecloud

sonarqubecloud Bot commented Jun 7, 2025

Copy link
Copy Markdown

@killev
killev merged commit 371ca76 into main Jun 7, 2025
@killev
killev deleted the 670-add-hover-effect-for-table-widget branch June 7, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants